.TH std::flat_map::value_compare 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::flat_map::value_compare \- std::flat_map::value_compare

.SH Synopsis
   class value_compare;  (since C++23)

   std::flat_map::value_compare is a function object that compares objects of type
   std::flat_map::const_reference (a pair of references to the stored key/value) by
   comparing the first components (i.e. keys) of the passed pairs.

.SH Member objects

   Member name    Definition
   comp (private) the comparison function object of type std::flat_map::key_compare
                  (exposition-only member object*)

.SH Member functions

   constructor   constructs value_compare object
   (private)     \fI(public member function)\fP
   operator()    compares two values of type value_type
                 \fI(public member function)\fP

std::flat_map<Key,T,Compare,KeyContainer,MappedContainer>::value_compare::value_compare

   private:                         (exposition only*)
   value_compare( key_compare c );

   Initializes the underlying instance of the comparator comp to c.

.SH Parameters

   c - a comparator to assign

std::flat_map<Key,T,Compare,KeyContainer,MappedContainer>::value_compare::operator()

   bool operator()( const const_reference& lhs, const const_reference& rhs ) const;

   Compares lhs.first and rhs.first by calling the stored comparator comp.

.SH Parameters

   lhs, rhs - values to compare

.SH Return value

   comp(lhs.first, rhs.first)

.SH Exceptions

   May throw implementation-defined exceptions.
